/* 七段显示器
    0  -
    5 | | 1
    6  -
    4 | | 2
    3  -
*/
#include <stdio.h>
int main(void)
{
    const int segments[10][7] = {
        {1, 1, 1, 1, 1, 1},
        {[1] = 1, 1},
        {1, 1, 0, 1, 1, 0, 1},
        {1, 1, 1, 1, 0, 0, 1},
        {[1] = 1, 1, [5] = 1, 1},
        {1, 0, 1, 1, 0, 1, 1},
        {1, 0, 1, 1, 1, 1, 1},
        {1, 1, 1},
        {1, 1, 1, 1, 1, 1, 1},
        {1, 1, 1, 1, 0, 1, 1}
    };
    for (int i = 0; i < 10; i++) {
        printf(" %c \n", segments[i][0] ? '-': ' ');
        printf("%c %c\n", segments[i][5] ? '|': ' ', segments[i][1] ? '|': ' ');
        printf(" %c \n", segments[i][6] ? '-': ' ');
        printf("%c %c\n", segments[i][4] ? '|': ' ', segments[i][2] ? '|': ' ');
        printf(" %c \n\n", segments[i][3] ? '-': ' ');
    }
}